<extend name="Public/base"/>

<!-- 子导航 -->
<block name="sidebar">
    <include file="sidemenu" />
</block>


<block name="body">
	<!-- 标题 -->
	<div class="main-title">
		<h2>
		草稿箱({$_total})
		</h2>
	</div>

	<!-- 按钮工具栏 -->
	<div class="cf">
		<div class="fl">
			<button class="btn ajax-post confirm" target-form="ids" url="{:U("Article/setStatus",array("status"=>-1))}">删 除</button>
		</div>

		<!-- 高级搜索 -->
		<div class="search-form fr cf">
		</div>
	</div>


	<!-- 数据表格 -->
    <div class="data-table">
        <?php
            $thead = array(
                '_html'=>array(
                    '_th'=>'row-selected',
                    'th'=>'<input class="check-all" type="checkbox"/>',
                    'td'=>'<input class="ids" type="checkbox" name="ids[]" value="$id" />',
                ),
				'id'=>'编号',
                'title'=>array(
                    '_title'=>'标题',
                    'tag'   =>'a',
					'href'	=>'Article/edit?cate_id=$category_id&id=$id',
                ),
				'type'=>array(
					'_title'=>'类型',
					'tag'   =>'span',
					'func'	=>	'get_document_type($type)',
				),
                'category_id'  =>array(
                    '_title'=>'分类',
                    'tag' =>'span',
                    'func'  =>'get_cate($category_id)',
                ),
                'update_time'=>array(
                    '_title'=>'最后更新',
                    'tag'   =>'span',
                    'func'  => 'date("m-d H:i",$update_time)',
                ),
                '操作'=>array(
					'编辑'=>array( 'href' => 'Article/edit?cate_id=$category_id&id=$id',),
                    '审核'=>array( 'href' => 'Article/setStatus?status=1&ids=$id', 'class'=>'ajax-get', 'condition'=>'$status==2',),
                    '禁用'=>array( 'href' => 'Article/setStatus?status=0&ids=$id', 'class'=>'ajax-get', 'condition'=>'$status==1',),
                    '启用'=>array( 'href' => 'Article/setStatus?status=1&ids=$id', 'class'=>'ajax-get', 'condition'=>'$status==0',),
                    '删除'=>array( 'href' => 'Article/setStatus?status=-1&ids=$id', 'class'=>'confirm ajax-get' ),
                ),
            );
            echo $_table_list = $__controller__->tableList($list,$thead);
        ?>
	</div>

	<!-- 分页 -->
    <div class="page">
        {$_page}
    </div>
</div>

</block>
<block name="script">
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">

</script>
</block>
